#ifndef CHOOSDICTIONARY_H
#define CHOOSDICTIONARY_H

#include <QDialog>
#include <QSqlTableModel>
#include <QRegExpValidator>
#include <QQueue>

namespace Ui {
    class ChoosDictionary;
}

class ChoosDictionary : public QDialog
{
    Q_OBJECT

public:
    explicit ChoosDictionary(QWidget *parent = 0);
    ~ChoosDictionary();

private slots:
    void on_actionNewWordsChanged_triggered();

    void on_pushButton_NewWordsSubmit_clicked();

    void on_pushButton_DeleteWords_clicked();

    void on_pushButton_ImportFromfile_clicked();

    void on_pushButton_ExportTofile_clicked();

    void on_pushButton_ExportAllTofile_clicked();

    void on_pushButton_NewWordsCancel_clicked();

    void on_tableView_Dictionary_doubleClicked(const QModelIndex &index);

private:
    void fetchAllDataFromDB();
    void searchThisRow(int theme=0);
    void exportReallyProcessing(QQueue<int> &);
    QSqlTableModel *tmodel;
    QRegExpValidator *newWordEngValidator;
    QRegExpValidator *newWordHunValidator;
    Ui::ChoosDictionary *ui;
    bool wModifyMode;
    int wModifyID;
};

#endif // CHOOSDICTIONARY_H
